package me.firstapp.spi.bbs;

import java.util.Map;

import me.firstapp.common.json.ListObject;
import me.firstapp.common.json.PageObject;
import me.firstapp.common.json.SingleObject;
import me.firstapp.common.module.bbs.JsonAdvertisement;

public interface AdvertisementService {

	/**
	 * 调用通过id查询广告接口
	 * 
	 * @param id
	 * @return
	 */
	SingleObject<JsonAdvertisement> findAdvertisementById(Long id);

	/**
	 * 调用新增广告接口
	 * 
	 * @param title
	 * @param description
	 * @param image
	 * @param url
	 * @param startDate
	 * @param endDate
	 * @param sort
	 * @return
	 */
	SingleObject<JsonAdvertisement> addAdvertisement(String title, String description, String image, String url,
			Long startDate, Long endDate, Integer sort);

	/**
	 * 调用更新广告接口
	 * 
	 * @param id
	 * @param title
	 * @param description
	 * @param image
	 * @param url
	 * @param startDate
	 * @param endDate
	 * @param status
	 * @param sort
	 * @return
	 */
	SingleObject<JsonAdvertisement> updateAdvertisement(Long id, String title, String description, String image,
			String url, Long startDate, Long endDate, Integer status, Integer sort);

	/**
	 * 调用查询所有广告列表接口
	 * 
	 * @return
	 */
	ListObject<JsonAdvertisement> findAvailableAds();

	/**
	 * 调用分页查询广告接口
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @param searchParams
	 * @param sortParam
	 * @param sortType
	 * @return
	 */
	PageObject<JsonAdvertisement> findAdsPage(Integer pageNo, Integer pageSize, Map<String, Object> searchParams,
			String sortParam, String sortType);

	/**
	 * 调用删除广告接口
	 * 
	 * @param ids
	 * @return
	 */
	SingleObject<Object> deleteAdvertisements(String ids);
}
